package com.insigma.business.qrcode.job.service.impl;


import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.job.dao.JobFairSignInfoDao;
import com.insigma.business.qrcode.job.dto.search.JobFairSignInfoBSearcher;
import com.insigma.business.qrcode.job.entity.JobFairSignInfoDO;
import com.insigma.business.qrcode.job.service.JobFairSignInfoService;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("jobFairSignInfoService")
public class JobFairSignInfoServiceImpl implements JobFairSignInfoService {

    @Autowired(required = false)
    private JobFairSignInfoDao jobFairSignInfoDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<JobFairSignInfoDO> search(final JobFairSignInfoBSearcher jobFairSignInfoBSearcher) {
        return jobFairSignInfoDao.search(jobFairSignInfoBSearcher);
    }
   
    @Override
    public JobFairSignInfoDO get(final String id){
        return jobFairSignInfoDao.get(id);
    }

    
    @Override
    public Integer insert(final JobFairSignInfoDO jobFairSignInfoDO){
        jobFairSignInfoDO.setId(sequenceGenerator.genKey(SequenceNameConstant.JOB_FAIR_SIGN_INFO_ID));
        return jobFairSignInfoDao.insert(jobFairSignInfoDO);
    }

    
    @Override
    public Integer update(final JobFairSignInfoDO jobFairSignInfoDO){
        return jobFairSignInfoDao.update(jobFairSignInfoDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return jobFairSignInfoDao.delete(id,modifierType,modifierId);
    }

    @Override
    public Integer countByFairId(String fairId) {
        return jobFairSignInfoDao.countByFairId(fairId);
    }

}
